local M = {}

local colorCfg = configTool.getCfg("colorCfg")

local fontCfg = {
	[1] = native.systemFont,
	[2] = native.systemFontBold
}

function M.newText(params)
	local parent = params.parent
	local colorId = params.colorId or 1
	local text = params.text or ""
	local fontType = params.fontType or 1

	local fontSize = params.fontSize or 24
	local width, height = params.width, params.height
	local align = params.align

	params.font = fontCfg[fontType]

	local text = display.newText(params)

	text:setFillColor(unpack(colorCfg.colors[colorId]))
	
	return text
end

return M